package controller

import (
	"github.com/gin-gonic/gin"
	"start/app/user/api/controller/vo"
)

type user struct {
	Controller
}

// list
//
//	@Summary		用户列表
//	@Description	获取全部用户列表
//	@Tags			user
//	@Accept			json
//	@Produce		json
//	@Security		ApiKeyAuth
//	@Param			Authorization	header		string					false	"Bearer 用户令牌"
//	@Success		200				{object}	vo.Body{data=vo.User}	"请求成功"
//	@Failure		500				{object}	vo.Body					"内部错误"
//	@Router			/v1/user/list [get]
func (controller user) list(c *gin.Context) {
	c.JSON(controller.send(vo.Body{Data: "ok"}))
}

func NewUser(router *gin.Engine) {
	c := user{}

	v1 := router.Group("/v1/user")
	v1.GET("/list", c.list)
}
